<template>
	<view>
		<uni-list>
			<uni-list-item title="停车场名称" :note="infocar.parkName"></uni-list-item>
			<uni-list-item title="距离" :note="infocar.distance"></uni-list-item>
			<uni-list-item title="地址" :note="infocar.address"></uni-list-item>
			<uni-list-item title="剩余车位" :note="infocar.rates"></uni-list-item>
			<uni-list-item title="每小时价格" :note="infocar.priceCaps"></uni-list-item>
		</uni-list>
	</view>
</template>

<script>
	import {request} from '@/utils/request.js'
	export default {
		data() {
			return {
				id:'',
				infocar:''
			}
		},
		onLoad(e) {
			console.log(e)
			this.id=e.id
			this.getcarinfo()
		},
		methods: {
			async getcarinfo(){
				const res=await request({url:`prod-api/api/park/lot/${this.id}`})
				console.log(res)
				this.infocar=res.data.data
			}
		}
	}
</script>

<style>

</style>
